

package cn.nubia.admin.application.bean;

import cn.nubia.admin.common.mybatis.annotations.Column;
import cn.nubia.admin.common.mybatis.annotations.Id;
import cn.nubia.admin.common.mybatis.annotations.Table;
import cn.nubia.admin.common.mybatis.annotations.UnColumn;
import org.hibernate.validator.constraints.NotEmpty;

import java.io.Serializable;
import java.util.Map;
import java.util.TreeMap;

/**
 * Created by justin on 15/6/30.
 * CREATE TABLE `nb_feedback` (
 `id` int(11) NOT NULL COMMENT '编号',
 `user_id` int(11) DEFAULT NULL COMMENT '登录用户名',
 `user_name` varchar(50) DEFAULT NULL COMMENT '登录用户名',
 `contact` varchar(50) DEFAULT NULL COMMENT '联系方式',
 `phone_model` varchar(50) DEFAULT NULL COMMENT '手机型号',
 `phone_sdk` varchar(255) DEFAULT NULL COMMENT '手机固件版本',
 `market_version` varchar(255) DEFAULT NULL COMMENT '软件版本',
 `net_type` varchar(255) DEFAULT NULL COMMENT '网络类型',
 `create_time` int(11) DEFAULT NULL COMMENT '提交时间',
 `content` varchar(1024) DEFAULT NULL COMMENT '反馈内容',
 `email` varchar(255) DEFAULT NULL COMMENT '用户邮箱',
 `status` int(11) DEFAULT NULL COMMENT '状态(-1 删除 0正常 1已回复 )',
 `reply_content` varchar(1024) DEFAULT NULL COMMENT '回复内容',
 `admin_id` int(11) DEFAULT NULL COMMENT '回复人管理员id',
 `reply_time` int(11) DEFAULT NULL COMMENT '回复时间',
 PRIMARY KEY (`id`)
 ) ENGINE=InnoDB DEFAULT CHARSET=utf8 COMMENT='反馈内容';
 */
@Table(value = "nb_feedback")
public class Feedback implements Serializable{

    private static final long serialVersionUID = -8244661101951482489L;

    public static final int STATE_DEL = -1;
    public static final int STATE_REPLAYED = 1;

    public static final String COLUMN_STATE = "status";
    public static final String COLUMN_CREATETIME = "createTime";
    public static final String COLUMN_MARKETVERSION = "marketVersion";

    @Id(value = "id")
    private Integer id;
    @Column(value = "user_id")
    private Integer userId;//登录用户名
    @Column(value = "user_name")
    private String userName;//登录用户名
    @Column(value = "contact")
    private String contact;//联系方式
    @Column(value = "phone_model")
    private String phoneModel;//手机型号
    @Column(value = "phone_sdk")
    private String phoneSDK;//手机固件版本
    @Column(value = "market_version")
    private String marketVersion;//软件版本
    @Column(value = "net_type")
    private String netType;//网络类型
    @Column(value = "create_time")
    private Integer createTime;
    @Column(value = "content")
    private String content;//反馈内容
    @Column(value = "email")
    private String email;//用户邮箱
    @Column(value = "status")
    private Integer status;//状态(-1 删除 0正常 1已回复 )
    @NotEmpty(message = "{feedback.replyContent.null}")
    @Column(value = "reply_content")
    private String replyContent;//回复内容
    @Column(value = "admin_id")
    private Integer adminId;//回复人管理员id
    @Column(value = "reply_time")
    private Integer replyTime;//回复时间
    @UnColumn
    private String createTimeShow;
    @UnColumn
    private String replyTimeShow;
    @UnColumn
    private String statusName;

    public static Map<String,String> statusMap = new TreeMap<>();
    static {
        statusMap.put("0","未回复");
        statusMap.put("1","已回复");
    }


    public Integer getId() {
     return id;
    }

    public void setId(Integer id) {
     this.id = id;
    }

    public Integer getUserId() {
     return userId;
    }

    public void setUserId(Integer userId) {
     this.userId = userId;
    }

    public String getUserName() {
     return userName;
    }

    public void setUserName(String userName) {
     this.userName = userName;
    }

    public String getContact() {
     return contact;
    }

    public void setContact(String contact) {
     this.contact = contact;
    }

    public String getPhoneModel() {
     return phoneModel;
    }

    public void setPhoneModel(String phoneModel) {
     this.phoneModel = phoneModel;
    }

    public String getPhoneSDK() {
     return phoneSDK;
    }

    public void setPhoneSDK(String phoneSDK) {
     this.phoneSDK = phoneSDK;
    }

    public String getMarketVersion() {
     return marketVersion;
    }

    public void setMarketVersion(String marketVersion) {
     this.marketVersion = marketVersion;
    }

    public String getNetType() {
     return netType;
    }

    public void setNetType(String netType) {
     this.netType = netType;
    }

    public Integer getCreateTime() {
     return createTime;
    }

    public void setCreateTime(Integer createTime) {
     this.createTime = createTime;
    }

    public String getContent() {
     return content;
    }

    public void setContent(String content) {
     this.content = content;
    }

    public String getEmail() {
     return email;
    }

    public void setEmail(String email) {
     this.email = email;
    }

    public Integer getStatus() {
     return status;
    }

    public void setStatus(Integer status) {
     this.status = status;
    }

    public String getReplyContent() {
     return replyContent;
    }

    public void setReplyContent(String replyContent) {
     this.replyContent = replyContent;
    }

    public Integer getAdminId() {
     return adminId;
    }

    public void setAdminId(Integer adminId) {
     this.adminId = adminId;
    }

    public Integer getReplyTime() {
     return replyTime;
    }

    public void setReplyTime(Integer replyTime) {
     this.replyTime = replyTime;
    }

    public String getCreateTimeShow() {
        return createTimeShow;
    }

    public void setCreateTimeShow(String createTimeShow) {
        this.createTimeShow = createTimeShow;
    }

    public String getReplyTimeShow() {
        return replyTimeShow;
    }

    public void setReplyTimeShow(String replyTimeShow) {
        this.replyTimeShow = replyTimeShow;
    }

    public String getStatusName() {
        return statusName;
    }

    public void setStatusName(String statusName) {
        this.statusName = statusName;
    }
}
